import request from '@/utils/request'

// 查询市场回访列表
export function listVisit(query) {
  return request({
    url: '/erp/visit/list',
    method: 'get',
    params: query,
  })
}

// 查询市场回访详细
export function getVisit(id) {
  return request({
    url: '/erp/visit/' + id,
    method: 'get',
  })
}

// 新增市场回访
export function addVisit(data) {
  return request({
    url: '/erp/visit',
    method: 'post',
    data: data,
  })
}

// 修改市场回访
export function updateVisit(data) {
  return request({
    url: '/erp/visit',
    method: 'put',
    data: data,
  })
}

// 删除市场回访
export function delVisit(id) {
  return request({
    url: '/erp/visit/' + id,
    method: 'delete',
  })
}

// 导出市场回访
export function exportVisit(query) {
  return request({
    url: '/erp/visit/export',
    method: 'get',
    params: query,
  })
}

export function visitListRecord(query) {
  return request({
    url: '/erp/visit/list/record',
    method: 'get',
    params: query,
  })
}
